package grupobbva.pe.operhc.listener;


import grupobbva.pe.operhc.service.ActualizarQuartzService;
import grupobbva.pe.operhc.service.ActualizarQuartzServiceImpl;

import grupobbva.pe.operhc.util.GenericObject;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;




public class iniQuartz implements ServletContextListener {

	private ActualizarQuartzService actualizarQuartzService=null;
	
	public void contextInitialized(ServletContextEvent e){
		ServletContext cntxt = e.getServletContext();
		Logger logger = Logger.getLogger(this.getClass());
		
	
		try {
			actualizarQuartzService=new ActualizarQuartzServiceImpl( );			
			actualizarQuartzService.actualizarConfiguracionQuartz();
			
		} catch (Exception ex) {
			logger.error(GenericObject.formatException(ex));
		}

	}
	public void contextDestroyed(ServletContextEvent e){
			System.out.println("Destroyed");
	}
}
